<template>
  <el-pagination
    background
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :modelValue:current-page="pageIndex"
    :page-sizes="[10, 20, 50, 100]"
    :page-size="pageSize"
    layout="total, sizes, prev, pager, next, jumper"
    :total="totalCount"
  />
</template>

<script setup lang="ts">
defineProps({
  //选择变化，每页数
  handleSizeChange: {
    type: Function,
    // eslint-disable-next-line @typescript-eslint/no-empty-function
    default: () => {},
  },
  // 选页变化，当前页
  handleCurrentChange: {
    type: Function,
    // eslint-disable-next-line @typescript-eslint/no-empty-function
    default: () => {},
  },
  //当前页
  pageIndex: {
    type: Number,
    default: 1,
  },
  //一页显示数目
  pageSize: {
    type: Number,
    default: 10,
  },
  //总数
  totalCount: {
    type: Number,
    default: 0,
  },
})
</script>

<style scoped></style>
